<div id="box_login">
    <a href="<?php echo site_url('home');?>"><img src="<?php echo img_theme('mcgannigan/mcgannigan.png');?>"></a>
    <a href="<?php echo site_url('home');?>"><img src="<?php echo img_theme('logo_text.png');?>"></a>
    <p class="title_high"><?php echo lang('label_register');?><hr></p>
    <form method="post" accept-charset="utf-8" action="<?php echo site_url(uri_string());?>">

        <!-- username -->

        <?php if ($use_username): ?>
        <div>
            <label for="username"><?php echo lang('label_username');?></label>
            <input type="text" name="username" id="username" value="<?php echo set_value('username');?>" maxlength="<?php echo $this->config->item('username_max_length', 'tank_auth');?>" required autofocus />
        </div>
        <?php if (isset($errors['login'])):?>
            <div id="bubble">
                <?php echo form_error('username'); ?>
                <?php echo isset($errors['username'])?$errors['username']:''; ?>
                <a href="<?php echo site_url('home');?>"><img src="<?php echo img_theme('mcgannigan/mcgannigan_bla.png');?>"></a>
            </div>
            <?php endif;?>

        <?php endif ?>

        <!-- email -->
        <div>
            <label for="email"><?php echo lang('label_email');?></label>
            <input type="email" name="email" id="email" value="<?php set_value('email');?>" maxlength="80" required />
        </div>
        <?php if (isset($errors['email'])):?>
        <div id="bubble">
            <?php echo form_error('email'); ?>
            <?php echo isset($errors['email'])?$errors['email']:''; ?>
            <a href="<?php echo site_url('home');?>"><img src="<?php echo img_theme('mcgannigan/mcgannigan_bla.png');?>"></a>
        </div>
        <?php endif;?>

        <!-- password -->
        <div>
            <label for="password"><?php echo lang('label_password');?></label>
            <input type="password" name="password" id="password" value="<?php set_value('password');?>" maxlength="<?php echo $this->config->item('password_max_length', 'tank_auth');?>" required />
        </div>
        <?php if (isset($errors['password'])):?>
        <div id="bubble">
            <?php echo form_error('password'); ?>
            <?php echo isset($errors['password'])?$errors['password']:''; ?>
            <a href="<?php echo site_url('home');?>"><img src="<?php echo img_theme('mcgannigan/mcgannigan_bla.png');?>"></a>
        </div>
        <?php endif;?>

        <!-- confirm_password -->
        <div>
        <label for="password"><?php echo lang('label_confirm_password');?></label>
        <input type="password" name="confirm_password" id="confirm_password" value="<?php set_value('confirm_password');?>" maxlength="<?php echo $this->config->item('password_max_length', 'tank_auth');?>" required />
        </div>
        <?php if (isset($errors['confirm_password'])):?>
        <div id="bubble">
            <?php echo form_error('confirm_password'); ?>
            <?php echo isset($errors['confirm_password'])?$errors['confirm_password']:''; ?>
            <a href="<?php echo site_url('home');?>"><img src="<?php echo img_theme('mcgannigan/mcgannigan_bla.png');?>"></a>
        </div>
        <?php endif;?>
        <div>
            Código de registro
            <input name="code" type="text" pattern="(mediavida)?(gamersmafia)?(ht_forum)?" title="Código de registro no válido" required />

            <?php if ($captcha_registration): ?>
            <?php if ($use_recaptcha): ?>

                <div id="recaptcha_image"></div>

                <a href="javascript:Recaptcha.reload()">Get another CAPTCHA</a>
                <div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')">Get an audio CAPTCHA</a></div>
                <div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')">Get an image CAPTCHA</a></div>

                <div class="recaptcha_only_if_image">Enter the words above</div>
                <div class="recaptcha_only_if_audio">Enter the numbers you hear</div>

                <input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
                <?php echo form_error('recaptcha_response_field'); ?>
                <?php echo $recaptcha_html; ?>

                <?php else: ?>
                <p>Enter the code exactly as it appears:</p>
                <?php echo $captcha_html; ?>
                <label for="captcha" />Confirmation Code</label>
                <input type="text" name="captcha" id="captcha" maxlength="8" required />
                <?php echo form_error('captcha'); ?>
                <?php endif;?>
            <?php endif;?>
        </div>
        <input type="submit" value="Registrarse" class="button" />
    </form>
</div>